From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi@qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi@qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi@qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi@qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi@qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi@qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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: Tue Mar 14 23:22:01 2006 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: Tue Mar 14 23:22:01 2006 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 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Tue Mar 14 23:22:01 2006 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: Tue Mar 14 23:22:01 2006 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Tue Mar 14 23:22:01 2006 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request@mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx@mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel@BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne@ieee.org http://modelrr.adbyrne.us From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Tue Mar 14 23:22:01 2006 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 uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi@qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi@qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi@qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi@qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi@qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0001.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi@qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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: Tue Mar 28 18:25:25 2006 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: Tue Mar 28 18:25:25 2006 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 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Tue Mar 28 18:25:25 2006 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: Tue Mar 28 18:25:25 2006 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Tue Mar 28 18:25:25 2006 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request@mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx@mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel@BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne@ieee.org http://modelrr.adbyrne.us From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Tue Mar 28 18:25:25 2006 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 uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi@qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi@qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi@qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi@qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi@qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0002.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi@qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi@qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx@mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi@qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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: Tue Mar 28 20:17:21 2006 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: Tue Mar 28 20:17:21 2006 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 12:26:31 2005 From: frank-list at uol.com.br (Francisco Areas Guimaraes) Date: Tue Mar 28 20:17:21 2006 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: Tue Mar 28 20:17:21 2006 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Tue Mar 28 20:17:21 2006 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request@mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx@mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel@BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne@ieee.org http://modelrr.adbyrne.us From francisco.guimaraes at newpos.com Fri Jul 1 12:26:00 2005 From: francisco.guimaraes at newpos.com (Francisco Areas Guimaraes) Date: Tue Mar 28 20:17:21 2006 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 uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0003.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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 uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0004.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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 uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0005.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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 uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0006.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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 uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0007.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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 uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0008.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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 uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0009.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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 uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0010.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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 uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0011.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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 uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0012.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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 uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0013.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0013.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0014.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0014.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0015.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0015.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0016.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0016.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0017.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0017.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0018.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0018.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0019.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0019.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0020.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0020.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0021.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0021.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0022.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0022.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0023.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0023.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0024.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0024.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0025.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0025.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0026.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0026.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0027.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0027.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0028.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0028.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0029.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0029.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0030.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0030.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0031.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0031.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0032.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0032.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0033.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0033.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0034.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0034.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0035.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0035.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0036.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0036.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0037.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0037.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0038.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0038.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0039.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0039.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0040.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0040.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0041.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0041.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0042.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0042.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0043.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0043.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0044.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0044.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0045.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0045.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0046.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0046.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0047.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0047.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0048.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0048.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0049.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0049.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0050.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0050.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0051.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0051.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0052.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0052.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0053.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0053.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0054.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0054.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0055.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0055.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0056.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0056.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0057.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0057.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0058.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0058.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0059.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0059.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0060.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0060.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0061.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0061.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0062.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0062.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0063.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0063.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0064.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0064.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0065.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0065.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0066.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0066.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0067.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0067.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0068.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0068.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0069.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0069.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0070.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0070.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0071.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0071.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0072.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0072.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0073.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0073.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0074.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0074.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0075.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0075.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0076.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0076.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0077.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0077.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0078.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0078.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0079.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0079.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0080.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0080.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0081.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0081.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0082.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0082.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0083.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0083.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0084.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0084.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0085.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0085.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0086.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0086.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0087.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0087.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0088.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0088.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0089.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0089.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0090.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0090.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0091.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0091.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0092.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0092.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0093.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0093.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0094.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0094.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0095.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0095.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0096.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0096.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0097.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0097.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0098.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0098.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0099.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0099.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0100.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0100.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0101.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0101.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0102.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0102.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0103.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0103.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0104.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0104.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0105.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0105.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0106.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0106.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0107.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0107.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0108.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0108.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0109.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0109.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0110.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0110.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0111.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0111.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0112.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0112.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0113.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0113.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0114.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0114.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0115.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0115.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0116.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0116.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0117.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0117.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0118.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0118.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0119.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0119.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0120.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0120.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0121.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0121.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0122.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0122.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0123.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0123.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0124.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0124.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0125.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0125.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0126.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0126.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0127.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0127.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0128.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0128.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0129.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0129.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0130.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0130.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0131.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0131.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0132.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0132.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0133.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0133.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0134.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0134.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0135.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0135.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0136.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0136.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0137.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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 allen at adbyrne.us Thu Jun 30 06:55:58 2005 From: allen at adbyrne.us (Allen Byrne) Date: Thu, 30 Jun 2005 07:55:58 -0500 Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> References: <20050630053101.BEB0C29D5F2@mail.electronpusher.org> Message-ID: <200506300755.59159.allen@adbyrne.us> On Thursday 30 June 2005 00:31, rxtx-request at mail.electronpusher.org wrote: > >Message: 8 >Date: Sat, 25 Jun 2005 10:50:24 +0200 >From: Uwe Kubosch >Subject: [Rxtx] RXTX in FC3/FC4 >To: rxtx at mail.electronpusher.org >Message-ID: <1119689424.12606.14.camel at BPC0276> >Content-Type: text/plain > >Hi all! > >I am trying to get RXTX to work on Fedora Core, version 3 or 4. > >I have tried this with both rxtx 2.0 and 2.1. > >I have tried on two different machines. > >I have tried with java 1.4.2 and java 1.5.0, both from Sun. > >I always get a signall 11 from the native libraries when they are >loaded. ?Is this a common problem? ?Any help is greatly appreciated. >Below is the start of the error message. ?More can be supplied on >demand. > >An unexpected exception has been detected in native code outside the VM. >Unexpected Signal : 11 occurred at PC=0x65015A >Function=(null)+0x65015A >Library=/lib/ld-linux.so.2 > I had thi same problem on SUSE9.3 and java 1.5.0. After searching through the archives, I found a patch that required adding a sleep(1000) command in two functions of SerialIO.java. This only was for rxtx2.1, I had no trouble with rxtx2.0. Note, also I had to add the "|1.5*" sequence to the configure.in file to get good *.so libs. Again 2.0 was fine. -- Allen Byrne adbyrne at ieee.org http://modelrr.adbyrne.us 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-0137.vcf From uwe at kubosch.no Mon Jun 27 14:13:57 2005 From: uwe at kubosch.no (Uwe Kubosch) Date: Mon, 27 Jun 2005 22:13:57 +0200 Subject: [Rxtx] RXTX on FC4 Message-ID: <1119903238.2989.27.camel@BPC0276> Hi all! I just got RXTX to work on Fedora Core 4. The standard download did not work. I had to check the code out from CVS and build it, but then it worked flawlessly. Thanks for your good work. Now I wonder if I should contribute the compiled files so that others will have an easier time than me getting RXTX to work on FC4. What do I do? Who do I talk to? donV From taj at www.linux.org.uk Mon Jun 27 14:29:46 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Mon, 27 Jun 2005 21:29:46 +0100 (BST) Subject: [Rxtx] RXTX on FC4 In-Reply-To: <1119903238.2989.27.camel@BPC0276> References: <1119903238.2989.27.camel@BPC0276> Message-ID: On Mon, 27 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I just got RXTX to work on Fedora Core 4. > > The standard download did not work. > > I had to check the code out from CVS and build it, but then it worked > flawlessly. > > Thanks for your good work. > > Now I wonder if I should contribute the compiled files so that others > will have an easier time than me getting RXTX to work on FC4. What do I > do? Who do I talk to? > > The best thing to do with FC is to contibute an extras RPM. Debian does something like this with their .deb packaging. As rxtx is OS neutral, it is almost impossible to have everything on rxtx.org. If you do get a package in Fedora Extras, I can point a link there. The extra's mail list is here: https://www.redhat.com/mailman/listinfo/fedora-extras-list If it would help to have me release a 'stable' .tar.gz of the source for the RPM submittal process I can do that. It would also trigger upgrades in debian which would not be bad. -- Trent Jarvi tjarvi at qbang.org From slavelle at atcorp.com Mon Jun 27 16:23:20 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Mon, 27 Jun 2005 17:23:20 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: Message-ID: <42C07C58.1030608@atcorp.com> Hey Trent, I installed it and now I get IOExceptions instead of the other one. I'm not sure how those changes would have enabled setDivisor and setBaudBase to work though. Is it significant that this is a USB device emulating a serial port? ~ Shawn From taj at www.linux.org.uk Mon Jun 27 18:07:58 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 01:07:58 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: <42C07C58.1030608@atcorp.com> References: <42C07C58.1030608@atcorp.com> Message-ID: On Mon, 27 Jun 2005, Shawn Lavelle wrote: > Hey Trent, > I installed it and now I get IOExceptions instead of the other one. > I'm not sure how those changes would have enabled setDivisor and > setBaudBase to work though. Is it significant that this is a USB device > emulating a serial port? > The USB driver probably does not support this. With USB, the ioctl()'s appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through the linux drivers/usb tree and found to ioctl to support this in Linux 2.6.10. RXTX is not doing very much magic, the patch really only gets the serial struct instead of writing a structure with random values for baudbase and handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel level driver issue not a user space library issue. So if you wanted this to work, the usb serial driver would have to handle the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression after looking through the USB tree quickly. I hope that helps. -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Mon Jun 27 18:25:22 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Mon, 27 Jun 2005 20:25:22 -0400 Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) Message-ID: Hi All, I wrote: Jasmine: Is this working any better? And Jasmine says: Nope. An error occurred while launching/running the application. Title: addbk.JAddressBook.Main Vendor: DocJava, Inc. Category: Unexpected Error gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) I am using -source 1.3 and -target 1.3 for the compilation, however, we still seem to have this problem, which my machine (for some reason) does not have. Does anyone have any ideas about what might be the problem? Thanks! - DL From taj at www.linux.org.uk Mon Jun 27 19:04:37 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 02:04:37 +0100 (BST) Subject: [Rxtx] web start + RXTX = strange errors? (Jasmine Strong) In-Reply-To: References: Message-ID: On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I wrote: > Jasmine: Is this working any better? > > And Jasmine says: > Nope. > > An error occurred while launching/running the application. > > Title: addbk.JAddressBook.Main > Vendor: DocJava, Inc. > Category: Unexpected Error > > gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) > > > I am using -source 1.3 and -target 1.3 > for the compilation, however, we still seem to have this problem, > which my machine (for some reason) does not have. > Does anyone have any ideas about what might be the problem? > This has shown up in the past with jdk 1.5 compiled jars running on jre 1.4 machines. My guess is either jasmine has an old copy of rxtx with the problem on her machine that is being picked up on the classpath or you have not tried this with jre 1.4. The suggested -source/target fix should avoid the problem. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Mon Jun 27 21:23:55 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 04:23:55 +0100 (BST) Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: On Tue, 28 Jun 2005, Trent Jarvi wrote: > On Mon, 27 Jun 2005, Shawn Lavelle wrote: > > > Hey Trent, > > I installed it and now I get IOExceptions instead of the other one. > > I'm not sure how those changes would have enabled setDivisor and > > setBaudBase to work though. Is it significant that this is a USB device > > emulating a serial port? > > > > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > > RXTX is not doing very much magic, the patch really only gets the serial > struct instead of writing a structure with random values for baudbase and > handles errors cleaner. Supporting the TIOC*SERIAL ioctl is a kernel > level driver issue not a user space library issue. > > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. > > I hope that helps. > > > It may be possible that you can just modify translate_speed and get_java_baudrate in SerialImp.c to have the new high speds you are after. The defines are in /usr/include/termios.h. #define B57600 0010001 #define B115200 0010002 #define B230400 0010003 #define B460800 0010004 #define B500000 0010005 #define B576000 0010006 #define B921600 0010007 #define B1000000 0010010 #define B1152000 0010011 #define B1500000 0010012 #define B2000000 0010013 #define B2500000 0010014 #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 You can see many of these are not handled. I dont think CommAPI handled more than 57600 or so. int get_java_baudrate( int native_speed ) { switch( native_speed ) { case B0: return 0; case B50: return 50; case B75: return 75; case B110: return 110; case B134: return 134; case B150: return 150; case B200: return 200; case B300: return 300; case B600: return 600; case B1200: return 1200; case B1800: return 1800; case B2400: return 2400; case B4800: return 4800; case B9600: return 9600; case B19200: return 19200; case B38400: return 38400; case B57600: return 57600; default: return -1; } } int translate_speed( JNIEnv *env, jint speed ) { LEAVE( "RXTXPort:translate_speed" ); switch( speed ) { case 0: return B0; case 50: return B50; case 75: return B75; case 110: return B110; case 134: return B134; case 150: return B150; case 200: return B200; case 300: return B300; case 600: return B600; case 1200: return B1200; case 1800: return B1800; case 2400: return B2400; case 4800: return B4800; case 9600: return B9600; case 19200: return B19200; case 38400: return B38400; #ifdef B57600 case 57600: return B57600; #endif /* B57600 */ #ifdef B115200 case 115200: return B115200; #endif /* B115200 */ #ifdef B230400 case 230400: return B230400; #endif /* B230400 */ #ifdef B460800 case 460800: return B460800; #endif /* B460800 */ #ifdef B14400 case 14400: return B14400; #endif /* B14400 */ #ifdef B28800 case 28800: return B28800; #endif /* B28800 */ #ifdef B128000 /* dima */ case 128000: return B128000; #endif /* dima */ #ifdef B256000 /* dima */ case 256000: return B256000; #endif /* dima */ } /* Handle custom speeds */ if( speed >= 0 ) return speed; else { LEAVE( "RXTXPort:translate_speed: Error condition" ); return -1; } } -- Trent Jarvi tjarvi at qbang.org From lyon at docjava.com Tue Jun 28 05:20:21 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Tue, 28 Jun 2005 07:20:21 -0400 Subject: [Rxtx] cross-compilation using Make for Mac Message-ID: Hi All, Please excuse the long post; Trent said: >" >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. " Here is what I have on the mac version: java -version java version "1.4.2_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4) Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode) When I run: http://show.docjava.com:8086/book/cgij/code/jnlp/math.benchmarks.Dhry.jnlp I get: -- listing properties -- jnlpx.heapsize=NULL,NULL jnlpx.splashport=-1 java.runtime.name=Java(TM) 2 Runtime Environment, Stand... java.protocol.handler.pkgs=com.sun.javaws.net.protocol sun.boot.library.path=/System/Library/Frameworks/JavaVM.fra... java.vm.version=1.4.2-38 awt.nativeDoubleBuffering=true gopherProxySet=false http.auth.serializeRequests=true java.vm.vendor="Apple Computer, Inc." java.vendor.url=http://apple.com/ path.separator=: java.vm.name=Java HotSpot(TM) Client VM file.encoding.pkg=sun.io jnlpx.home=/Applications/Utilities/Java/Java Web... user.country=US sun.os.patch.level=unknown java.vm.specification.name=Java Virtual Machine Specification user.dir=/ java.runtime.version=1.4.2_05-141.4 java.awt.graphicsenv=apple.awt.CGraphicsEnvironment java.endorsed.dirs=/System/Library/Frameworks/JavaVM.fra... os.arch=ppc java.io.tmpdir=/tmp line.separator= java.vm.specification.vendor=Sun Microsystems Inc. jnlpx.remove=false os.name=Mac OS X sun.java2d.fontpath= java.library.path=/Applications/Utilities/Java/Java Web... java.specification.name=Java Platform API Specification java.class.version=48.0 jnlpx.deployment.user.home=/Users/lyon/Library/Caches/Java Web S... java.util.prefs.PreferencesFactory=java.util.prefs.MacOSXPreferencesFactory os.version=10.3.9 user.home=/Users/lyon user.timezone=America/New_York java.security.policy=file:/Applications/Utilities/Java/Jav... java.awt.printerjob=apple.awt.CPrinterJob trustProxy=true java.specification.version=1.4 file.encoding=MacRoman jnlpx.deployment.system.home=/Applications/Utilities/Java/J2SE 5.0... user.name=lyon java.class.path=/Applications/Utilities/Java/Java Web... java.vm.specification.version=1.0 sun.arch.data.model=32 java.home=/System/Library/Frameworks/JavaVM.fra... java.specification.vendor=Sun Microsystems Inc. user.language=en awt.toolkit=apple.awt.CToolkit java.vm.info=mixed mode java.version=1.4.2_05 java.ext.dirs=/Users/lyon/Library/Java/Extensions:/... sun.boot.class.path=/System/Library/Frameworks/JavaVM.fra... java.vendor=Apple Computer, Inc. file.separator=/ java.vendor.url.bug=http://developer.apple.com/java/ sun.cpu.endian=big sun.io.unicode.encoding=UnicodeBig mrj.version=141.3 jnlpx.jvm=/System/Library/Frameworks/JavaVM.fra... sun.cpu.isalist= sun.awt.exception.handler=apple.awt.CToolkit$EventQueueExceptio... javawebstart.version=javaws-1.4.2_05 800 mhz g4,878k ds/sec total time: 1184ms Result: 844594 dhrystone/sec. Load average for last 15 minutes:0.62 So, I feel pretty sure that I have tried this with 1.4. As to modifying the RXTX compilation, that I did not do...and I take your point. I have been using the binary distributions as is. Oops. I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Now when I do a make, I get: make gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known libtool: link: warning: undefined symbols not allowed in i386-pc-mingw32 shared libraries rm -fr .libs/librxtxSerial.la .libs/librxtxSerial.* .libs/librxtxSerial-2.1-7pre20.* (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ln: `SerialImp.o': File exists make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 So, I do a make clean, then a make: .... (cd /home/lyon/current/java/serial/cvs/i386-pc-mingw32 && ln -s SerialImp.lo SerialImp.o) ar cru .libs/librxtxSerial.a /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o ar: /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.o: No such file or directory make: *** [i386-pc-mingw32/librxtxSerial.la] Error 1 In the i386 directory, there is a symbolic link left from something: ls -al SerialImp.o lrwxrwxrwx 1 lyon lyon 12 Jun 28 07:03 SerialImp.o -> SerialImp.lo However, the SerialImp.lo is not present (which is the cause of the error, I think). On the other hand, the file I am looking for is present in: i686-pc-linux-gnu Possibly the i386 generation is not clean (of course it is also likely that I am just asking dumb questions, being a newbie to the code and all.). Finally, will this make file regenerate the distro for the mac? I found some really old (from year 2001) files in: cvs/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions Which I could use for the distro...but I would prefer to do a clean, multi-platform build from make. Thanks! - Doug >On Mon, 27 Jun 2005, Dr. Douglas Lyon wrote: > >> Hi All, >> I wrote: >> Jasmine: Is this working any better? >> >> And Jasmine says: >> Nope. >> >> An error occurred while launching/running the application. >> >> Title: addbk.JAddressBook.Main >> Vendor: DocJava, Inc. >> Category: Unexpected Error >> >> gnu/io/CommPortOwnershipListener (Unsupported major.minor version 49.0) >> >> > > I am using -source 1.3 and -target 1.3 >> for the compilation, however, we still seem to have this problem, >> which my machine (for some reason) does not have. >> Does anyone have any ideas about what might be the problem? >> > >This has shown up in the past with jdk 1.5 compiled jars running on jre >1.4 machines. My guess is either jasmine has an old copy of rxtx with the >problem on her machine that is being picked up on the classpath or you >have not tried this with jre 1.4. > > >The suggested -source/target fix should avoid the problem. > >-- >Trent Jarvi >tjarvi at qbang.org From slavelle at atcorp.com Tue Jun 28 09:43:41 2005 From: slavelle at atcorp.com (Shawn Lavelle) Date: Tue, 28 Jun 2005 10:43:41 -0500 Subject: [Rxtx] [Patch] Linux Custom Baud Rates. In-Reply-To: References: <42C07C58.1030608@atcorp.com> Message-ID: <42C1702D.1070307@atcorp.com> > The USB driver probably does not support this. With USB, the ioctl()'s > appear to be defined in linux/drivers/usb/serial/*.c I grep'ed through > the linux drivers/usb tree and found to ioctl to support this in Linux > 2.6.10. > So if you wanted this to work, the usb serial driver would have to handle > the TIOCGSERIAL and TIOCSSERIAL ioctls. At least that is my impression > after looking through the USB tree quickly. There is ioctl stuff in the driver for the chip, but i haven't seen the TIOC*SERIAL entries. That might be why it continues to fail. I did get around the problem, though, by hacking the driver and just specifying the baud rate I need. Now everything works well. Thanks for all the assistance you've provided. ~ Shawn M. Lavelle From taj at www.linux.org.uk Tue Jun 28 12:42:29 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:42:29 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: gcc -I/home/lyon/current/java/serial/cvs -Ii386-pc-mingw32 -I. -I/usr/java/jdk1.5.0_02//include -I/usr/java/jdk1.5.0_02//include/./linux/ -ansi -D_BSD_SOURCE -D__need_timespec -c /home/lyon/current/java/serial/cvs/./src/SerialImp.c -DDLL_EXPORT -DPIC -o /home/lyon/current/java/serial/cvs/i386-pc-mingw32/SerialImp.lo /home/lyon/current/java/serial/cvs/src/SerialImp.c: In function `Java_gnu_io_RXTXPort_Initialize': /home/lyon/current/java/serial/cvs/src/SerialImp.c:251: storage size of `old_action' isn't known /home/lyon/current/java/serial/cvs/src/SerialImp.c:256: storage size of `new_action' isn't known Add a compiler flag -DWIN32 The code above should not be compiling on w32 as it is #if !defined(WIN32) You can look at the bottom of Makefile.in to see the w32 compile flags. Search for "WIN32 CrossCompiling from here down" If its still not working, I can set you up with the Bob account. Just email me off the list. W32 compiling is a bit complicated. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Tue Jun 28 12:52:50 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Tue, 28 Jun 2005 19:52:50 +0100 (BST) Subject: [Rxtx] cross-compilation using Make for Mac In-Reply-To: References: Message-ID: I went into the Makefile and altered the javac flag: JAVAC = $(JPATH)/bin/javac -classpath $(CLASSPATH) -d $(TOP)/ -O -source 1.3 -ta rget 1.3 Since this is auto-generated, I would think that the better thing to do would be to alter configure. Nods. I did change configure but right now it is only in the baudbase/divisor patch I posted. I'm going to add several extension baud rates that can be supported by normal API calls and commit that today as a followup to my comments yesterday on baudrates. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Wed Jun 29 01:52:10 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 08:52:10 +0100 (BST) Subject: [Rxtx] [PATCH] More baud rate fixes Message-ID: I went through the native baudrate conversion from Java and added several. This patch is against CVS 2.1 head. I think thats it for baud rate fixes unless someone see something. -- Trent Jarvi tjarvi at qbang.org -------------- next part -------------- A non-text attachment was scrubbed... Name: baud_base_and_divisor_plus_odd_baudrates.diff.gz Type: application/x-gzip Size: 3291 bytes Desc: Url : http://mailman.qbang.org/pipermail/rxtx/attachments/20050629/4c1ef1c2/baud_base_and_divisor_plus_odd_baudrates.diff-0138.gz From lyon at docjava.com Wed Jun 29 10:33:45 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Wed, 29 Jun 2005 12:33:45 -0400 Subject: [Rxtx] java.comm dependencies Message-ID: Hi All, During a build of the rxtx code, I have left the javax.comm out of the system (on purpose). However, I get an error, at run time: CommPortIdentifier:static initialization() apple.awt.EventQueueExceptionHandler Caught Throwable : java.lang.NoClassDefFoundError: javax/comm/CommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver I am thinking that there is something in the gnu.io.CommPortIdentifier that seeks to load the javax.comm.CommDriver. It was my understanding that we could write code without reference to the javax.comm.CommDriver and that we could work in the gnu namespace. Is this true? Thanks! - Doug From taj at www.linux.org.uk Wed Jun 29 11:16:08 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Wed, 29 Jun 2005 18:16:08 +0100 (BST) Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > During a build of the rxtx code, I have left the > javax.comm out of the system (on purpose). > However, I get an error, at run time: > > CommPortIdentifier:static initialization() > apple.awt.EventQueueExceptionHandler Caught Throwable : > java.lang.NoClassDefFoundError: javax/comm/CommDriver > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > that seeks to load the javax.comm.CommDriver. > > It was my understanding that we could write code without reference > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > Is this true? > Yes. People use 2.1 without javax all the time. There should be no reference to javax at all in rxtx 2.1. You may check your code. I just did a grep through 2.1 and there is nothing. You may look at the classes you are using. If you find javax.comm in your code, replace it with gnu.io and that should be all you need to do. -- Trent Jarvi tjarvi at qbang.org From jayant28k at gmail.com Wed Jun 29 21:49:28 2005 From: jayant28k at gmail.com (Jayant Kawadkar) Date: Thu, 30 Jun 2005 09:19:28 +0530 Subject: [Rxtx] java.comm dependencies In-Reply-To: References: Message-ID: <6a6a02310506292049778c452f@mail.gmail.com> Trent, I think best idea is to have wiki for rxtx code. So as the traffic is increasing with time. "RXTX" seems to be more popular in embbeded system. Sun Microsystems will always apperciate your efforts on parallel and serial ports commincation based application in IT Industry. Thanks for your help on this forum as "ONE MAN ARMY" ;-) Cheers, Jayant On 6/29/05, Trent Jarvi wrote: > On Wed, 29 Jun 2005, Dr. Douglas Lyon wrote: > > > Hi All, > > During a build of the rxtx code, I have left the > > javax.comm out of the system (on purpose). > > However, I get an error, at run time: > > > > CommPortIdentifier:static initialization() > > apple.awt.EventQueueExceptionHandler Caught Throwable : > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > java.lang.NoClassDefFoundError: javax/comm/CommDriver > > > > > > I am thinking that there is something in the gnu.io.CommPortIdentifier > > that seeks to load the javax.comm.CommDriver. > > > > It was my understanding that we could write code without reference > > to the javax.comm.CommDriver and that we could work in the gnu namespace. > > > > Is this true? > > > > Yes. People use 2.1 without javax all the time. > > There should be no reference to javax at all in rxtx 2.1. You may check > your code. I just did a grep through 2.1 and there is nothing. You may > look at the classes you are using. > > If you find javax.comm in your code, replace it with gnu.io and that > should be all you need to do. > > > -- > Trent Jarvi > tjarvi at qbang.org > _______________________________________________ > Rxtx mailing list > Rxtx at mail.electronpusher.org > http://www.electronpusher.org/mailman/listinfo/rxtx > From chris_jh at blueyonder.co.uk Tue Jun 28 05:37:10 2005 From: chris_jh at blueyonder.co.uk (Christopher Harris) Date: Tue, 28 Jun 2005 12:37:10 +0100 Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError Message-ID: <42C13666.9030108@blueyonder.co.uk> Hi I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 32bit) The serial ports work fine with no issues, but when i try to use the parallel port i get this message Experimental: JNI_OnLoad called. Devel Library ========================================= Native lib Version = RXTX-2.0-7pre2 Java lib Version = RXTX-2.0-7pre2 Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize at gnu.io.LPRPort.Initialize(Native Method) at gnu.io.LPRPort.(LPRPort.java:66) at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) I am trying to print a line out to port "/dev/lp0" At first i thought it could not find the librxtxParallel.so file, but when i renamed it i got a different saying it could not find the library. I have tried to run as root no difference. It is really weird, i get no compile errors and the serial ports work fine. I changed the LPRPort.java and commented out the Initialize call method. And just get the same error but for the method open. It is as though it can't see the methods, and yet it can see the library. I did have a bit of check of the JNI implementation in rxtx but could not spot anything. Yours Thankfully Christopher Harris From lyon at docjava.com Thu Jun 30 02:28:09 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 04:28:09 -0400 Subject: [Rxtx] tools Message-ID: Hi All, I have been thinking about automatic cross-platform native method development of Java/C programs. It appears that different binary tools are needed to target different platforms. Configuration seems a bit painful. Is there something better available than make? Is ANT any good at this? Has anyone tried: http://jnipp.sourceforge.net/ Thanks! - Doug From lyon at docjava.com Thu Jun 30 04:11:17 2005 From: lyon at docjava.com (Dr. Douglas Lyon) Date: Thu, 30 Jun 2005 06:11:17 -0400 Subject: [Rxtx] javax.comm Message-ID: Hi All, When I load my jar files on a linux box, all is well. However, when I load them on a mac, I get: java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver java.lang.NoClassDefFoundError: javax/comm/CommDriver thrown while loading gnu.io.RXTXCommDriver The jar files for the mac are different from the jar files for linux, because recompilation of the native code for the mac has not been easy, for me. As a result, the RXTX jars are tending toward specific versions and platforms. Probably, this is not an ideal situation, but, I suspect, it is common. 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 However, even they have problems on an unconfigured machine: Specified adapter name "DS9097U" is not known * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cannot load default adapter. Please check that the adapter is connected and that no other application is using the port. If you have checked the adapter, the default port might not be selected. Either set the value of the TMEX default using the utility provided with the TMEX Runtime, or create a new file in the /lib folder called onewireviewer.properties with two lines, similar to the following: #native win32 drivers adapter.name={DS9097U} adapter.port=COM1 #or javax.comm drivers adapter.name=DS9097U adapter.port=COM1 The full path to this file should be: /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/onewireviewer.properties ---- Wow, that is a show stopper! Configuration is something that we really need to think about as an automatic thing, particularly for web start users. You can't ask a person who wants to run an application to figure out how to alter a properties file. If you know you need one, then get permission and make one...automatically. That makes a lot of sense, to me. Basically, we need an installer. At the very least, all the pre-built binaries and jars needed for the RXTX package on several platforms should be available from a single place. One this happens, we can make a JNLP file that is platform specific, but can give us a level of indirection. Is this something that has been done already? Thanks! - Doug From taj at www.linux.org.uk Thu Jun 30 08:10:22 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 15:10:22 +0100 (BST) Subject: [Rxtx] tools In-Reply-To: References: Message-ID: On Thu, 30 Jun 2005, Dr. Douglas Lyon wrote: > Hi All, > I have been thinking about automatic cross-platform > native method development of Java/C programs. > > It appears that different binary tools are needed to target different > platforms. Configuration seems a bit painful. > > Is there something better available than make? > > Is ANT any good at this? I'm far from an Ant expert but have used it for other projects. The main problem I see with ant is there is no mainstream support for platform neutral neutral library creation as far as I can tell. I think ant is a fine replacement for make but I've not seen a suitable replacement for autoconf. At that point, make is as good as anything. It should be possible to create a ant build.xml that works on say Solaris, Linux, Windows and Mac OS X. The problem is when you are trying to build a library for embeded ARM from Mac OS X. > Has anyone tried: > http://jnipp.sourceforge.net/ -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:22:02 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:22:02 +0100 (BST) Subject: [Rxtx] RXTX in FC3/FC4 In-Reply-To: <1119689424.12606.14.camel@BPC0276> References: <1119689424.12606.14.camel@BPC0276> Message-ID: On Sat, 25 Jun 2005, Uwe Kubosch wrote: > Hi all! > > I am trying to get RXTX to work on Fedora Core, version 3 or 4. > > I have copied the *.so files to /usr/java/j2sdk1.4.2_04/jre/lib/i386 > directory and the RXTXcomm.jar to /usr/java/j2sdk1.4.2_04/jre/lib/ext > directory. > > I have edited the jre/lib/javax.comm.properties according to the docs. > > I have tried this with both rxtx 2.0 and 2.1. > > I have tried on two different machines. > > I have tried with java 1.4.2 and java 1.5.0, both from Sun. > > I always get a signall 11 from the native libraries when they are > loaded. Is this a common problem? Any help is greatly appreciated. > Below is the start of the error message. More can be supplied on > demand. > > An unexpected exception has been detected in native code outside the VM. > Unexpected Signal : 11 occurred at PC=0x65015A > Function=(null)+0x65015A > Library=/lib/ld-linux.so.2 > > NOTE: We are unable to locate the function name symbol for the error > just occurred. Please refer to release documentation for possible > reason and solutions. > > > Current Java thread: > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1560) If you compile rxtx from source, this will probably go away. I'm not sure what the exact cause is but it looks like the binaries are not suitable for FC3/4. The ABI may have changed since those had been compiled. -- Trent Jarvi tjarvi at qbang.org From taj at www.linux.org.uk Thu Jun 30 14:26:56 2005 From: taj at www.linux.org.uk (Trent Jarvi) Date: Thu, 30 Jun 2005 21:26:56 +0100 (BST) Subject: [Rxtx] PARALLEL PORT java.lang.UnsatisfiedLinkError In-Reply-To: <42C13666.9030108@blueyonder.co.uk> References: <42C13666.9030108@blueyonder.co.uk> Message-ID: tOn Tue, 28 Jun 2005, Christopher Harris wrote: > Hi > > I am using java 1.5 (32bit) and rxtx-2.0-7pre2 on linux (Mandrake 10.2 > 32bit) > > The serial ports work fine with no issues, but when i try to use the > parallel port i get this message > > > Experimental: JNI_OnLoad called. > Devel Library > ========================================= > Native lib Version = RXTX-2.0-7pre2 > Java lib Version = RXTX-2.0-7pre2 > Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize > at gnu.io.LPRPort.Initialize(Native Method) > at gnu.io.LPRPort.(LPRPort.java:66) > at gnu.io.RXTXCommDriver.getCommPort(RXTXCommDriver.java:830) > at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:547) > > > I am trying to print a line out to port "/dev/lp0" > > At first i thought it could not find the librxtxParallel.so file, but > when i renamed it i got a different saying it could not find the library. > > I have tried to run as root no difference. > > It is really weird, i get no compile errors and the serial ports work fine. > > I changed the LPRPort.java and commented out the Initialize call method. > And just get the same error but for the method open. > > It is as though it can't see the methods, and yet it can see the library. > I did have a bit of check of the JNI implementation in rxtx but could > not spot anything. > > > You can check if the symbols are in the shared library: nm librxtxSerial.so |grep Initialize If the symbols are not there, there was a build error. Watch very close for build errors while compiling from source. I suspect something isnt behaving right. -- 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: